Cosmo - Common code for all plugins