Using regular expressions to hack our way towards AMDfication

And tweaks to our code styles
This might flow better without a paragraph break here ("It took me a day..." and "It now allows..." can both be a single para)