Added new functions and documentation.