Updated getlocations and locations controller