Refactor main a smidgen for future pages.