refactors and moves things around to be uhm...refactory