Tooltips are never set, so make it obvious in the return.
Simplify the time_data_model() calculations.
Remove temporary variable that we don't need.
Don't bind keys if we aren't using them.
Remove unused variables.
Move variable creation to where they're used.
Don't bind the keys if we don't need them.
No need to check whether locations are passed in.