Reorder tests, minor clean-ups