refactoring, cleaning up