Restructuring for ease of understanding