Cleanup of .each's, variable names, ordering