Improved test coverage + fixed issues