Removing all unecessary closures in modules