Reformat code.
Move all inline initialization to initialize function.