Added support for comments in transition tables.

End-of-line comments are now supported.
Also did some refactoring to clean up the code and to optimize
(likey prematurely) the regular expression evaluation.