moved view.ts into many separate files