Refatorate views, adds controllers and modele add pg