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