Minor improvements following lwalsh's suggestions