Appledocs documentation + some small code fixes

Closes #23