Refactored.
Bug fixes.
Some UI work. Bug fix.