Update user-extensions.js

Some minor cleanup and bugfixes..