Massive changes. Still not quite done.