BTW Mangle was made by
Alex Yatskov "FooSoft" -
https://github.com/FooSoft/mangle
Then it was forked by
proDOOMman -
https://github.com/proDOOMman/Mangle (added some features and optimization).
And now the latest fork/version is by
Birua -
https://github.com/Birua/Mangle (bug fixes, new features)
Discussion is here:
http://www.the-ebook.org/forum/viewtopic.php?t=16243
ciromattia, please, look at the latest fork sources. They should be useful.