Rejigger some testing and add some comments for code divers.