Updated posts controller and index view