Refactored hourly/monthly/yearly calculator, started adding tests