Sex refactor