fix some (really) faulty logic in the primitive syntax coloring code
improve syntax coloring a bit