Fixed hashing with the core classes. Also fixed agents class, and a few other small bugs.