Rewrote documentation for public functions