Work in progress... You can see a poor documentation of how it works on my github abeldonate