Close statements correctly, add update function