Moved some things around, for tidiness.