Many tweaks to steps 5, 6, and 7