Added equals, hashCode, and compareTo functions to AnyMemory and Entity.
Added EntityList.
Random Refactoring.