Thanks Patrick for the thorough review. I've reviewed your changes and they are all correct. The last two new commits are also good to go.