Rewrite Manager with entity-manager interface