Restored scripts

Moved back from models.js to internal scripts in md files