Updates with local fixes. Improves array foreach binding and toJSON