Add test helper, misc smaller changes