Update for 7.1.x and some general cleanups

Hello, would it be possible to merge this to make it usable again out of the box for the latest releases?

Thanks!