optimized imports, unittest moved to "tests" directory, nullpointer bugfix