Shell, add improvements to MainTask