Merged new UI code