Extensions homogenization, cleaned up.

Rebased and cleaned up version of extension homogenisation. I will give some comments that should be fixed before merge now.
Should be fixed to use Lwt_log as soon as it's merged.