Added models flag, and a writeFile method C++ Model class.