Remove redundant local variables