Refactor of create_vapix_device