More refactoring. Yay