Refactor: Portal.js now loads twig automatically

  * Also improved handling of client-side modules in Twig.js