Cleanup and more tests