Added more test helpers and tweaks.