Update usage examples (analyzer.php) and cleaned up functions.php. Added static  to prevent memory exhaustion errors.