SOLR-5623: more complete refactor as per Hoss' suggestion.
SOLR-5623: pick up the rest of the review requests;
better comments and test failure management.