code: Fix indentation
code: Simplify initialize/finalize logic