Changed db to postgresql, minor changes accross the board