Use entity manager for log messages
Cleanup