nexus refactoring