tidyed up locations controller