Thanks Mircea. I've made some comments.
To all:
If you're gonna submit a big pull req, please use the description to *summarise the changes* in order to help reviewers. This helps focus the attention of the reviewer to the pieces of code that are most relevant.