Reduced line count and simplified code significantly