Corrected function names and comments