More major refactoring. My OCD is better now.