#1. Minor code improvements suggested by @MirkoHochmuth.