Fixing assertion errors.
Merge pull request #4 from aborg0/refactored_ui

Fixing assertion errors.