Make histogram size calc code more clear