Add 64bit support to master branch

Cherry Pick the following PR's into master branch
PR #6345
PR #6357 
PR #6363 
PR #6367 
PR #6336