More refactoring and streamlining.