Move view_model to its own module