Fixed code syntax and updated comments.