Adapted and cleaned up documentation.