Added UI handling and controller interface