Refactor to split responsibilities up into smaller objects - domWatcher and moduleLoader