* Added code block termination comments and other minor code formatting