Improved plugin detection
Cleaned up
Allowed nested packages and various other improvements
Fixed some comments