Improved the test suite, fixed a couple of bugs