Minor cleanup of subsite code

No new functionality or logic changes, but it's a lot of changes though.