Documentation

Bit of a misnomer, as there are two commits here: one does a bit of code cleanup, the second is the actual documentation drop.