Still working on refactoring.