Finalize UI work, add tests