Add init and update functions.