reenabled texture mapping, lighting adjustments, more error checks