splitted API in framework and app part and refactoring