Huge time-series improvements, refactoring.