Some code changes to avoid getPersonFromDB() code duplication in different functions