Edits by @ragnar