Broke up a huge main method into smaller methods to make this code easier to work with.  Also got rid of the IntelliJ warnings.