Minor reorg of code [ci skip]
Added stubs for plugins [ci skip]