Refactor testing a bit, and fix issue with titles for pending tests