Add pattern matching code
Add pattern lookup scripts