Added additional comments

Added more comments to aid understanding.