Wip/tests

This levels up our test coverage a bit and fixes few minor bugs