changes for hiera2
use gentoo/portage for managing use flags
optional api and some fixes