Improved plugin registration.