Passing tests
Various cleanups