Even more refactoring, time for the hard part