House cleaning.

Closes #13, closes #14, closes #15, closes #16, closes #17, closes #18,
closes #19, closes #20, closes #21 and closes #22.