Edited while loops.