Refactoring and oracle checks implementation