Pulled the extension out of model.cpp and put it at the top of the file