Fixed date calculation bug that made all checks not work in the first week of the month. Added caching.