Update to use separate functions for init/finish.