Fill empty hours with proper data

* Properly sort the array prior to sending it back
 * Sort from current to one hour earlier for proper data display
 * Adjusted templates to use new sorted arrays

Fixes #606