Clean up refactoring