Refactoring of the LocationUtil class.