Fixed some issues on layout and html
Refactored and added tornado as server (flask got performance issues on localhost.