Refactoring course dashboard viewmodel