Refactor models and views WiP

TODO: Fix remaining tests