add plugin boilerplate
add xfn_status_handler_cb with xfn_on, xfn_off, xfn_status commands
fix casting issues
fix invalid memory read