Fleshing out that main function a bit