Cleanup and test coverage