Improvements to case implementation.