Made daily rollover code more elegant