Renamed dimensions for plane and made more robust