further clean-up and viewmodel refactoring