Improved smart stepping, adapted some line chart improvements to bar chart, code cleanup.