Connection pooling implemented

#22

Connection is handled properly.. 

A test is fixed (semicov module was breaking because of the if statement without curly brackets)

Also bunch of indentantion fixes