Many adjustments to conform to LDoc