Placed all the global variable declaration at the top and started rudimentary keystroke translation.