More refactoring, but its looking good...