Datasource wizard test implemented and some refactoring done