major changes and BC breaks: bugfixes, added unit-test, added missing functionality