Hello.
I took @GreyDireWolf code and tried to improve on it by incorporating the changes as suggested in this MR.