refactored the fundamental data structure classes