Added more comments to the source codes