Added some tests
More tests, fixes