Availability API and some error corrections