API updates and bugfixes