Move protocol-specific js back into the main js file.