Fixed the model file generation. Closes #17.