Fixed call to getConnection
Fixed some syntactic stuff, added proxy function.