Program initialization function.