Added documentation for helper functions.