refactor / optimize device updates