Patients, Doctors refactoring