Fixed missing function errors, and removed calls module_invoke_all().