Remove dead code and debug messages

issue on drupal.org : https://www.drupal.org/node/2304157