Added input class and basic main loop.