Added a second stage init function: pre_run