Remove closures

Remove closures in config file and put it into Module.php