Bugfixes. Ui implementation, etc.