various fixes to allow the plugin to be used on both RB2 and RB3 - issue #4