Added update and draw functions.