Patches pushed as 4c1dff9abeb383ca58dbfcbc27e1bd464d2ad2ea and following (with a few indentation fixes). Thanks.