last changes before transforming into a plugin.