UI updates and code restructuring