Move some things around, fix some indenting.