added more stable plugin wrapper and structure