Refactor for Yii2 Alpha