Added axes, title  to the bar chart and some refactoring.