Re-structure JS modules.