Move some of the common functionality to the new liboac-commons