Moved all input handling to the input class. Also changed some variable names