refactoring and purging of duplicate tests