Patch pushed as f9dd7683c6740240895cfdd5f82d014277e2faf0 with some modifications. Thanks.