Update examples, fix line-counting bug