Changed location functions to location_in_view