Fix bad references, port default
Add model template