Fixes to the model import, changes to templates