restructoring plugins a bit to be future-proof. and adding defaults option for a plugin