merge
small refactoring - cleanup - test fixes - removed statics - passes unit tests