Additional features and minor changes

Reorganized the variables at the top of the program
Changed the way the enter, and backspace button works with live completions
other minor rule changes for live completions
Should probably add printError() also