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