Clean up unmask with some errors, clear structs, and set up some defaults for uidev