Refactor class diagram view-model