fixed references to non-existent cp_get function
fixed function calls
removed invalid imports, fixed the user-data retrieval, and fixed a bug where the disable_shutdown flag was not updated properly