Commit 6

Attempted to circumvent the problem with while loops running after each
other.