Code cleaning + remove terminal when  shutdown