Added Primitive/Triangle and some minor changes
Changed SAFE_DELETE macro name to something more uncommon