Bunch of small fixes from MMP, performance tweaking for module inits