refactoring; tests, blanks, patients crud