Clean up, refactoring