Added some model and handler code