Improved formatting of sample code for readability