Clean up tests.
Switch to PostgreSQL
clean up dbfiles

reuse duplicate code
search for inputs inside a time range, not exact match
fix db get traits code

original code was correct to use covariate.data and not covariates.data
use export not S3method
small tweak to run update.psql on the mac.