add qunit testing and refactor pattern definition structure
Merge pull request #1 from kenkubiak/master

add qunit testing and refactor pattern definition structure