Changes in API and fixes in copmilation