Optimized Plane.java code