Started porting code to the new plugin.