Enabled Edit functionality. Tweaked update function.