I think `lstrip` might be a bit overzealous, but I've added a comment to explain what it's doing.