Removing carbon monoxide or hydrocarbons