Move plugin code to the module