Refactoring Code for Location Detail