Refactorizing the adapters and execution classes