documented Doctrine Helper Class (and a little refactoring)