A Simple Framework for Nonparametric Specification Testing