* UI refactoring * Code cleanup. * Minor fixes. * Tests fixed and unified and code removed. * Fix bug. * Update terser to fix compile error.