Add some docs and comments.