Merge pull request #1592 from sylus/7.x-2.x

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

Updates for 4.x branch.
Update references from 2.x to 4.x