Prepare init code