Adding in z index and proper z sorting of sprites