BS-7958
Use abstraction for Refactoring operations + add unit tests