Copy-pasta typos fixed and extra end removed.