Basic data structure implementations from university class.