Fixed bugs with TreeMaps, Added new tables for storing object states