David v3

Fully integrates terminal with game and layout. Allows game.html to interact with app.js through main.js's socket.