Finish code documentation. Closes #8
Fixes #11