Removed duplicate function definitions