Some improvements to init_process() function.