Re-factored type safe logic.
Fixed bug with displaying events for today after user comes from day view to month view.