Refactored Main to be useable for pretty-printing...