Switched to BoneCP for SQL operations. This code should be considered unstable.