Error check and add comments to Assignment 6.