Heavily tweak the code style across the app, doing things such as fixing returns and giving names to lambda values.