Refactored tests framework.