Many updates and corrections on API