cleaning up device structs, adding resolver polling
adding limit-safe write function