Remove not needed variables, comment some code