Fix problem with static functions.
Removed all from doctrine2, will not be used.