isolated plugin from test code
added case sensitive and whole word options

also structured the plugin a little better by moving the function logic and initial settings into closure wrapping the method rather than inside the method.