small performance and docs improvements