Distinguish index from coordinates and added basic occlusion rules