Refactored libcharm as a package