refactored some existing code, adding weekly/monthly snapshot statistics views.