Fixed SubmitChanges missing bug.
Extracted viewmodel into its own file.