More deleting and refactoring