Moar refactor