Added global variables and parseIntCheck() method.