added support for CF Rights Management plugin. Fixed some bugs