Some improvements in the plugins API.