Refactoring DocumentTypeController