Delete unused code in mainview