refactored sphinx configuration and templates