Integrate all 2017 patches to simplify development
Since the first tag in this github is mostly the original code in Bengt Larsson's last release, I have preserved the code and I don't need to keep the patches eternally. Thus I will use the patch system for development and integrate the patches in the releases.