d119a67482
When the function is defined inside the ABM, a new closure is allocated every time the ABM runs. Since the action function is already way too long, it's better for readability and performance to split it out.