Add input cleanup

That's exactly what I said.