Minor cleanups
Refactor get_parent_locations to just get unique proper parent