Added documentation (and removed a useless function).