Test speed

some small speed improvements and other yak shaving