Removed unused imports.
Added fix for no plugins directory specified.