Initial commit of the extension

It is still very rough and improvable, but the idea is there, and it works.

Change-Id: I66e65106beec5ad61d35fe7f106689807d951fc9