Moved core and modmanage to be loaded before events