Formatted header and main function.