MORE CRUD. Added edit funcion and flashes.