Made project build for all architectures (include arm64)
Fixed some memory leaks that the clang analyzer pointed out
Merge pull request #136 from cjhanson/1.x

Made project build for all architectures (include arm64) and memory issues
Merge branch '1.x' into cleanup
Some 64-bit fixes.
Found some headers that were being copied twice.