More epic refactoring