Improved plugin loading