Refactoing to simplify workflow for UI.

And more documenting.