Remove unnecessary activities