Improved comments and documentation.