Restructure UI classes