Fixed depth buffer issues, added texture initializer