Started work on making it a more opaque API by adding Lock(Connection*) and Unlock(Connection*) functions.