PostgreSQL support
Added MongoDB support. Moved things around. Fixed SQL.