Make histogram into a module