Simplifying environment and db connection info
Fixing up sql typo