Performance improvement and documentation