Add working update code

Yay!