Restructure and clean up older test boilerplate