Small improvements to WMS handler and renderer code