Fixed regular expressions.
Started Demo2 implementation. #3
Various bugfixes/improvements.