Minor coding improvements