refactor core data classes  based on code review by Eddie