Restructure
IO terminates on ^C
Functional refactor