Turn O(n^2) parsing of shaders into O(n)

fixes the list concatenation gotcha
Cosmetic: make markdown parser a bit nicer to read and switch out (++"") for id to avoid an extra copy
cosmetic: use Haskell style guide recommendation for many cased definition