Refactoring out a location class