refactor test set-ups for more reliable testing. atg.