Move initialization code to Railtie