improved unittests, improved formatting