Refactoring Data class