Generic Data Structure Implementations and Tweaks