More isolated unit tests, small tweaks