Removing deprecated entitymanager