More extensive unit testing (still short of full coverage).