More refactoring/cleanup