Coffee-ised some of the code (mostly removing parenthesis). Parameterised more values.