Refactored testing framework.