Cleaning up, input handler