Updated InputListener to be a bit more succinct and hopefully correct