Implemented better resize detection, added a test file and added ElementQuery.update method.