Fixed syntax error and added more comments.