removed several for-loops
cached regular expression
using deepEqual instead of JSON.stringify
removed unnecessary array
Merge pull request #1 from fearphage/extra-array

Optimizations