refactors UI to put date range logic into model as scopes