refactoring. move abstract classes to data library