z-index and transformation matrices

Addresses issues #5 and #6