Remove unnecessary variable assignment and return value