Integrate Hugo's PR with added changes

Hi all,

This is based on #229 and fixes the following:

* #227
* #226
* #224
* #221
* #220
* #218

It also has the following improvements to get it ready for merging:

* Stylus brought fully inline with the Scss. This includes:
    * Code layout/spacing
    * Function names
    * Default (`?=`) values added to `_settings.styl` for easy overwriting
* Fully documented using JSDoc compliant syntax
* Many small tweaks to make sure everything is consistent

**This is a huge set of changes that will require lots of testing.**

I have interactively rebased it a bunch of times to get it down to 11 commits from 30, but I think before it gets merged we should squash it further, maybe even to one commit. The reason for that is that there are a couple of weird discrepancies that resulted from rebasing such a complex tree that have resulted in one or two instances of changes being made and then being overwritten to the correct ones in a way that means we can't specifically squash those commits and keep the same meaning. Squashing it will allow us to have a commit or two that only make the changes we want, without the few little oddities showing up half way haha.

Anyway, give this a look over and let me now if you have any questions.