Corrected a few function calls and updated comments for consistency