Wouldn't it be wiser to create a function with the content of this `function()`. It is so indented that it is almost not possible to be reviewed...