Adding refresh capability

Now we can redraw a cloud without retrieving the data for it again.
Also beginning some refactoring work.