add doctypes and device views only if they don't exist