Modifications for making a2db a library.