Added view -> model logic and reformatted code

* Added view -> model logic into model command
* Reformatted all code to use two spaces indentation instead of tabs