Removed obsolete comments; improve functions.