Improved core comments and documentation.