Class inheritance

Major refactoring to nicely allow template inheritance in the visualizer descriptor. Also adds line numbers when errors show up and does stricter checking.