Rebased patch to new UI