Add some comments to input handler