Complete logic for main()

Functions and classes still have to be implemented
Finish boilerplating user interface