mother of all refactors