Added main event loop and user input. Input parsing is buggish.