created viewModels and cleaned up code