Some dirty fixes for frontend's time selection
Refactor time selection using bacon.js