Bugfixes and replacement of old parser with tokeniser and parser. Changes to TRS file syntax.