Refactor substitutions

Right now there are two problems with the code-base:

It's very difficult to find the right place to fix bugs
It's almost impossible to translate into other languages
I'm going to try to pull the substitutions that nickel does out into their own files, grouped by function. It's not going to fix the internationalisation problem (although it should be a good first step towards it), but it will make the code easier to maintain.