Merge pull request #9 from rjw57/warn-fix

io.cpp: fix warnings about narrowing conversions
Merge pull request #10 from rjw57/no-gui

Re-factor into GUI and non-gui versions
main_nogui: finish re-factoring main loop into functions
re-factor main loop into separate library
main.cpp: re-factor to use common main loop setup