Refactoring based on suggestions from Bahmni - RA-350, UICM-18, UICM-19, UICM-20, UICM-21