Minor bug fixed and comments added.