adding modulation, some code cleanup
naive implementation of texture editing