Updated registerPlugin()