Refactored sphinx