Fixed buffered RPC bug and refactored connection to Photon logic.