Cleanup, tests and lint