db changed to Postgre & some minor changes