Improved plugin API