Move Model to ui.ts