Move plugin loading logic off of main()