Restructre for publishing as lib
Fixing unittests for lib