Renamed few variable to more meangful names
Revisited logic that set Z-indices to 3D borders