Minor changes and added comments.