New API support, refactoring, minfixes on UI