A ton of refactoring in preparation of bosses