Cleanup & ViewmodelBase.ts

Recent pull request from MichaMarkic inspired me do to something more
for this project:
1. Little restructure and cleanup
2. Viewmodel base class