Move most of the computation to _init_code() to make the sfhdelayed module consister with other modules.