Estimation, Inference and Specification Analysis: Consistency of the QMLE