Using regular expressions to hack our way towards AMDfication

And tweaks to our code styles
when viewing the rich view, something seems broken in this line, and it's not rendering quite right