Moving class initialization into sided method