Clean up several warnings

Reworked the plugins loading logic