Addition of teardown function. Fixed bug referencing nonexistant texture