Charts - code cleanup