Moves more code into initViews.