Handling input in the Action Loop