Added documentation for all exported functions.