api has been extended to cope with more callbacks. Some bugs have been fixed all over the place