Improved Json::encode() security.
Enhanced ArrayHelper::toArray()
Fixed basic layout.
Removed unused code.