Add script to handle test running and some minor changes