Updated API...

Updated the entire API, made some quick patches and fixes.