FIxed bugs, reworked texture upload engine