Update & Fix Postgresql and minor cleanup