Move update() method call to a more sensible place.
Merged stuff.