Cleaning up, refactoring.