Improved plugins API