improvements to plugin code to handle larger amounts of data