Detect analyzation fields automatically, refactor viewmodel