Fixed issue with opening the connection twice
Fixed imports
updated lib project