[GAIA BUG1018819] - cleaning the code