Improved the EntityManager implementation.

The manager now stores shared_ptrs of Entities instead of the entities themselves. This is to allow for automatic memory management and the flexibility of creating Entities external to the class.