Created osm.h, re-factoring, unit test script bug fix