Added unit testing to the model and views