Change inputs to forms, add socketio functions

* Inputs are separate forms
* Inputs now interact with socket.io
* Moved lines around