Update extension.js

LATEST with all fixes to date