UI framework change

Change ui from flask to tornado.