sphinx output refactoring and improving