Added Z coords to primitives and updated translation