cleaning up the teardown() routines
expanding and fixing
more teardown() cleanup