Updated code style (brackets and new lines) and removed references to non standard yii code.