Fix problem where only the first hour report found would be shown, and clean up code a little