Cleaned up the loop, added navigation.

[Branch: development]