Separated initializing processes into functions.