Documented most functions.