Toplevel to test term datastructures