adding support for importing Badges; Refactoring test cases.