Move all closures to the main object