Added commenting for organization and explanation