Refactor init method.
Resolve merge conflicts.