Additional unit tests and removed use of OrderedDict