Rewrote the views and model