Building Safer Internet of Things Devices