start moving texture functions into own module