Closed #215 Refactoring everything that is related to the required fields in the documents