moved the texturehandler to an angular factory