Enhanced and simplified code structure