Using regular expressions to hack our way towards AMDfication

And tweaks to our code styles
Can I ask for [smart quotes](http://smartquotesforsmartpeople.com)? :)