Increasing performance by reducing db calls and refactoring logic for Location objects