Add comments

Added comments to the code.