More refactoring fun!