Reverting some of the code from the previous commit, no need to do a promise chain
Fixing module hooks, minor cleanups