refactoring rest processor and core api layer