Old and deprecated code gathered here in order to rewrite it better un the form of a plugin.