Refactor Moved import_client into lib. Added tests for importing clients.