Code and output formatting