worked on the c code a bit more. db.c is done now. couldn't get apr to compile, turns out were typo's so yea.