Code cleanup in Worldviewer

Reorganized some code in Worldviewer, to prepare for actual
implementation