Some more cleanups

cfa1716 was reverted because it was implemented wrong.