Added register extensions.
Merge with changes on github