allow to pass in blocks to be executed before and/or after module registration