some cleanup and docs.