Tidy up elongated statement into readable code