Fixes for #137 and #131

Fix for mapping issue and make operator match optional in the #match regex.