Slight tweak to remove unnecessary local variables.