Cleaned up EntityManager.java and added a ProcessManager method for ending all processes of a given type.