performance and documentation improvements