Change instance variables to local variables