refactoring wikibox.js