Release 4.0-beta1
Merge pull request #1598 from sylus/7.x-4.x

Updates for 4.x branch.