Metatest feature pt4

Some refactoring. Continued work in logging.