Fix for handling percent symbols
More fixes for matching on percent symbols.
Updated docs.
Added profiling code.