Changes to match algorithm and UI tweaks