Sphinx template cleanup

Cleaning up the code for @Carreau