Remove unnecessary commands