Big rewrite of perseus data pipeline.