Moving all code inside of a main() function

Bets practice for now. I'll break things apart into discrete functions
from here.