Elimated an unused assigment and an unnecessary variable