Move some initialization into initilize method.