Refactored input code
Fixes issue about firing when paused.