More refactoring fixes. Weeeh.