Replace instance variable with local variable