Refine the core block init code.
Reindent and add a guard to avoid div of zero.
Connect the finish signal handling mechanism.