Refactored input gathering into its own class responsible for gathering and applying input.

* Someday input gathering will be a separate module that will be subscribed to or something.