Changed some things like connection pooling and env