cleaned up a bit
added some code for texture objects