Refactored Vector struct into Vector3 and Vector4 structs. Fixed cleanup(). Rewrote matrixProduct(). Fixed applyPerspectiveMatrix().