Removed cruft, optimized legends.