Updated the comments and documentation