Added comment blocks for each function.