Miscellaneous code implemnting and testing various data structures