Cc 19

Work to support the first api call. Also added extra code to support auto building db from psql