update export function to pass in currentdb for objectexists calls
add repeated_rules