Corrected function names after refactoring