#4 #2 Fixed threading issues with Tornado server, improved the control logic and renamed the main program app.