Move some plugins to gems
Upgrades for Postgres syntax