Added some zbuffer transformation code
refactoring
changed naming scheme for relations