refactor factory closures in Module.php to ZF2 factories