Begin porting Photon.js