Refactor to have outer viewmodel

Might come in handy