Fixes and more tests