Initial move of app logic to typescript, add bundling