Major update to the main.java file.

The update contains the work we've done in the latest workshop.