Square demo with performance optimizations.