Clean up code structure and add comments.