Added initial database insertion code.