Sync with master #1

Updated v2.2 with important changes from master branch.