Started exporting some logic to make testing easier, and began testing

Per https://github.com/joeyespo/grip/issues/55:

Hi all. I exported some factory-esque logic into actual factories and wrote tests for them. The hope is that, because of these factories:
 1. Future change will be easier, since they are pretty simple and are decently tested
 2. Future testing is bootstrapped (starting is the hard part, right?)
 3. Factorizing logic may (later) reduce the amount of parameter coupling

Please let me know what you think. If any re-work seems necessary, let me know, or if you have any questions about the changes feel free to ask :)

Cheers,
Gilli