Porting over client side code to node-webkit.