Converted instance variables to local variables