Formatting main script.