added test_update_by_import & code cleanups