Misc: changed exec order
Made some helper functions for repeated jobs
Used shaders to apply color in WebGL

Special thanks to:
  https://developer.mozilla.org/en-US/docs/Web/WebGL/Using_shaders_to_apply_color_in_WebGL