added option to enable a rand disable ar.
small fix in Plugin template to be able to read exceptions in cleanup fn.
tweaks in marker detection