Dev Fixed incorrect event dispatch in beforeSave and afterSave.
Dev Added dynamic plugin model.