Got edit functionality working