Small refactors to code. Added some comments and implemented coarser lock for dictionary object
Added some comment
Added more complete test of connection pooling