cleanup test setup
consolidate toObject