Removed global variable, added a private property activeTextField to maintain last active text field info.