remove extra and unneeded closures.