Removed histogram buffer from histogram writing - seemed to be taking more time than it was worth