Made event objects directly inherit DateRange and moved that code to the src/lib/ directory.