Updated for version 5 of WSPlugIn API