Refactored to include all day events
Merge branch 'refactor'