Various updates, copied from HubAPI