Sucessfully moved location code to LocationController