Fixing bugs for very short time series and for empty results. Renamed a few metrics. Updated everything to the v0.4.0 release.