Bug 915156 - more module porting

DO NOT MERGE
Bug 915156 - make gaia code work in node.

DO NOT MERGE