Fix/doctrine events subscriber

Remove some old code and fix doctrine events subscriber registering.