creates edit and update methods and makes partial for form
adds flash notifications and sets root to index