Added ui.js

Split user interface in to its own file away from the game logic