Patches pushed as c72c3e50cd29c45f9e4f32313e5d937905085050 and following with a few modifications. Thanks.