Introduced a global static variable to denote current character.