Even more epic refactoring...