Fixed a syntax error and added a few comments.