Completed simple logic for locations.