Cleanup and separation of concerns