Improving tests and generation speed