Update the frontend UI and part of the logic