sphinx+clean: refactoring