Refactor long __init__ method to call two sub-methods

This change looks bigger than it really is due to the indentation
level changing; see diff view ignoring whitespace.