Performance improvement and docs updates.