Format the code for readability and put comments.