Pull in rkrol's important changes, make some notes of things as I have found them.