merging in lots of changes, especially building for amd64 also