Added beforeSend, error, and complete ajax callbacks