refactoring CoreApi to trait. change package.