Separating out repository logic, tidying up viewmodel and fixing page not
refreshing
Fixing problematic rebase