Added Oleksandrs Code
changed the return type of the connection methods to boolean
More changes from Oleksandr
Please let it be
Tidy