[Logic] Backend logic - refactoring