Applied MVVM

Changed the architecture of the project by applying the
Model-ViewModel-Model pattern.