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