Added comment sections to each function