Tweaks and some tests