Move Model Logic into the Model

Fork me on GitHub