Optimized output and added branch support