Add in the new code for working with extensions
Also fixes the issues with the wrong classes being loaded