Remove unnecessary variable and method call