Added texture manager
Fixed textures memory leak