Updated plane testing code