Using regular expressions to hack our way towards AMDfication

And tweaks to our code styles
Little ambiguous, reading this sentence I'm not sure what mapped to what.

Would suggest: 'we need an array mapping search terms to their replacements'