Moved onEvent Code

onEvent code was common for all states so i moved it the the class that
all states derive from (IAppState). inheritance shouldnt be used for
codereuse but w/e im lazy for the moment. an Input class should be made
later to replace this.