add foundation, clean up tests