Add documentation and comments.