Move functions from graphics/texture to graphics
Refactoring