refactor tests using helper; new script to build and test