Test and documentation improvements