Miscellaneous fixes and improvements
Migrated from Judy to uthash; fixed several bugs