Improve test suite:

add tests for new features recently added, also improve other tests