bargraph directive now working, fixed some script issues