[0.5.0] added tests with coverage, api changes, refactoring & bugfixes