Add callback support for the init function