Edits suggested by @BenClancy