Added a typedefs header to facilitate working with types in the game

Also, entity and characters now have ways to sort things.