Improved legend box.