Various changes to make things work.