Updated servlet to properly update / save devices