textures now flawless

some testing and optimizations, code cleanup