Changed to have a default for device since it isn't always needed