Added getting locations from the database.