Could you see if you can shorten these code repetitions a bit. E.g. a shortcut function that adds texture property + clamp property in one call?