Small design and coding improvements.