Fix some compiler warnings and long/int mismatches stemming from the earlier changes to the plugin format...