Some docs and code cleanup

Mostly things I could do without thinking too hard or with an internet connection.