More refactoring and implementing.