Make brush detection consistent, fix bugs in generating code tags.
Autocommit: libraries changed 2014-04-03-11:08:00