Faster stubs

Some minor tweaks to improve stub performance and timing.