Minor tweaks
Added option for pattern matching