Replace tuples with Vector3f. Replace array with vector. Misc clarity improvements.