Write pointcloud & refactor sendImage