Remove unnecessary variables and compare methods1