Added deferred NPM loading options if not already loaded
Refactored loading and running tasks