Merge pull request #1595 from sylus/7.x-4.x

Updates for 4.x branch.
Merge pull request #1596 from sylus/7.x-4.x

Updates for 2.x branch.
Final prep for beta release.