Added plane registration code