Some bugfixes and UI refinement.